#!/bin/sh
DAEMON_NAME=mydaemon
INITD=/etc/init.d/mydaemon

$INITD stop

if [ -x /sbin/insserv ]; then
  insserv -r ${DAEMON_NAME}
else
  update-rc.d -f ${DAEMON_NAME} remove
fi

exit 0
